package mi.payment.transaction.authorize.revoke;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;

import mi.payment.R;
import mi.payment.settings.TransactionOtherOperation;
import mi.payment.ui.base.V2BaseInputAdminPwdActivity;

/**
 * 预授权撤销模块 -- 输入主管密码界面
 */
public class PreAuthorizeRevokeInputAdminPwdActivity extends V2BaseInputAdminPwdActivity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        initView();
    }

    private void initView() {
        mTvTitle.setText(R.string.revoke);

        fullData(null);

        // 撤销退货类交易是否输入主管密码
        boolean isInputDirectorPwd = TransactionOtherOperation.getInstance().getTransactionOtherSettings().getInputDirectorPsd();
        showPasswordView(isInputDirectorPwd);
    }

    @Override
    public void onClickOK() {
        PreAuthorizeRevokeSwingActivity.startAction(this);
        finish();
    }

    public static void startAction(Context context) {
        Intent intent = new Intent(context, PreAuthorizeRevokeInputAdminPwdActivity.class);
        context.startActivity(intent);
    }

}
